package com.mine.hrx;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @功能
 * @创建时间 2020/4/14
 */
@SpringCloudApplication
@EntityScan("com.mine.hrx")
public class HrxApplication {
     // 创建RestTemplate对象
     @Bean
     @LoadBalanced
     public RestTemplate restTemplate() {
         return new RestTemplate();    }

    public static void main(String[] args) {
        SpringApplication.run(HrxApplication.class,args);

    }
}
